package input;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import GameObjects.KeyListeningPaddle;

public class MyKeyListener implements KeyListener{

	KeyListeningPaddle movable;

	public void setPaddleMovement(KeyListeningPaddle movable){
		this.movable  = movable;
	}
	
	@Override
	public void keyTyped(KeyEvent e) {
		char key = e.getKeyChar();
		switch(key){
		case 'w':movable.moveUp(5);
			break;
		case 's':movable.moveDown(5);
			break;
		};
	}

	@Override
	public void keyPressed(KeyEvent e) {
		
	}

	@Override
	public void keyReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

}
